package com.alks.entity.data.enums.biocontrol;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public enum ProdPlanEnum {
    CUT("业务色卡",1,"BUSS"),
    HF("技转核料",2,"TECH_BOM"),
    MATCH("技转试做",3,"TECH_TRAIL"),
    STITCH("大底下单",4,"SOLE_PUR"),
    LAST("面料下单",5,"UPPER_PUR"),
    /*大底和面料*/
    SOCK_MTL("面衬",6,"SOCK_MTL"),
    PACK_MTL("包材",7,"PACK_MTL");

    private final String processName;
    private final Integer processCode;
    private final String column;

    ProdPlanEnum(String flowName,Integer flowCode,String column){
        this.processCode = flowCode;
        this.processName = flowName;
        this.column = column;
    }

    public static List<String> getNameList(){
        return Arrays.stream(PrepairFlowEnum.values()).map(PrepairFlowEnum::getFlowName).collect(Collectors.toList());
    }

    public static String getColumnByCode(String flowCode){
        for (PrepairFlowEnum value : PrepairFlowEnum.values()) {
            if (value.getFlowName().equals(flowCode)) {
                return value.getColumn();
            }
        }
        return null;
    }
}
